import { nodeSizeSolve } from "@/hooks/graph/editable/node/size"
import { nodeTextSolve } from "@/hooks/graph/editable/node/text"
import { nodeTypeSolve } from "@/hooks/graph/editable/node/type"
import { nodeColorSolve } from "@/hooks/graph/editable/node/color"
import { nodeFiledSolve } from "@/hooks/graph/editable/node/filed"

// 节点处理
export function nodeMode(arg, wPublicConfig) {
  const { graphData } = arg
  const nodes = graphData?.nodes
  nodes?.forEach((node) => {
    node.x = Math.random() * 1000
    node.y = Math.random() * 1000
    // 处理颜色
    nodeColorSolve(node)
    // 处理大小
    nodeSizeSolve(node)
    // 处理文本
    nodeTextSolve(node)
    // 翻译类型
    nodeTypeSolve(node)
    // 添加字段
    nodeFiledSolve(node)
  })

}